/*求1+2!+3!+...+20!的和 */
public class Exerise_21 {
    public static void main(String[] args) {

        int sum1=0;
        for (int i = 1; i <= 20; i++) {
            int sum = 1;
            for (int j = 1; j <=i; j++) {
                sum = sum * j;
            }
            sum1=sum1+sum;
        }
        System.out.println("1！+2！+3！+4！....+20!="+sum1);
    }
}
